/* 客户端工具 */

function client_get_download_url()
{
  // http://localhost/app/php/client.php
  url = window.location.href;

  n = url.lastIndexOf("/");
  return url.substr(0, n) + "/downloadClient.php";
}

if (window.location.href.indexOf("client.php") != -1)
{
  $(document).ready(function(){
    $("#d_Loongnix").click(function() {
      console.log("#downloadClient_Loongnix");
      durl = client_get_download_url() + "?os=Loongnix";
      console.log(durl);
      downloadFile(durl);
    });
  });

  $(document).ready(function(){
    $("#d_Loongnix_server").click(function() {
      console.log("#downloadClienti_Loongnix_server");
      durl = client_get_download_url() + "?os=Loongnix_server";
      console.log(durl);
      downloadFile(durl);
    });
  });

  $(document).ready(function(){
    $("#d_Debian_desktop").click(function() {
      console.log("#downloadClient_Debian_desktop");
      durl = client_get_download_url() + "?os=Debian_desktop";
      console.log(durl);
      downloadFile(durl);
    });
  });
}



